﻿namespace _3DExercise
{
    using System;

    public static class DistanceBetwenTwoPoints
    {
        //// Write a static class with a static method to calculate the distance between two points in the 3D space.

        public static double CalculateDistanceBetwenTwoPoints(Point3D first, Point3D second)
        {
            return Math.Sqrt((double)(((second.CoordX - first.CoordX) * (second.CoordX - first.CoordX)) + ((second.CoordY - first.CoordY) * (second.CoordY - first.CoordY)) + ((second.CoordZ - first.CoordZ) * (second.CoordZ - first.CoordZ))));
        }
    }
}